package com.atguigu.spzx.product.client.fallback;

import com.atguigu.spzx.model.entity.order.OrderItem;
import com.atguigu.spzx.model.vo.common.Result;
import com.atguigu.spzx.model.vo.common.ResultCodeEnum;
import com.atguigu.spzx.product.client.ProductClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Slf4j
public class ProductClientFallback implements ProductClient {
    @Override
    public Result findSkuBySkuId(Long skuId) {
        log.error("远程访问product服务查询sku数据失败，skuid={}",skuId);
        return Result.build(ResultCodeEnum.UNKNOW_ERROR ,null);
    }

    @Override
    public Result findProductSkus(List<OrderItem> orderItemList) {
        log.error("远程访问product服务查询订单项的商品列表数据失败，orderItemList={}",orderItemList);
        return Result.build(ResultCodeEnum.UNKNOW_ERROR ,null);
    }
}
